{% extends "base.volt" %}
{% block pageHeader %}
    {{ stylesheet_link("/libs/bootstrap-daterangepicker/daterangepicker.css", false) }}
{% endblock %}
{% block pageFooter%}
	{{ javascript_include("/libs/bootstrap-daterangepicker/moment.min.js", false) }}
    {{ javascript_include("/libs/bootstrap-daterangepicker/daterangepicker.js", false) }}
    {{ javascript_include("/assets/manage/js/activity/commentList.js", false) }}
{% endblock %}

{% block content %}
    {{ partial("module/left_activity") }}
    <div class="col-xs-10">
        <ol class="breadcrumb">
            <li>活动管理</li>
            <li class="active">活动回复列表</li>
        </ol>

        <div class="panel panel-default">
            <div class="panel-body">
                <form class="form-inline" role="form" action="" method="get">
                	<input type="hidden" name="id" value="{{activity_id}}">
                    <div class="form-group">
                        <div class="input-group">
                        	<label class="input-group-addon" for="">用户名</label>
                        	<input class="form-control" type="text" name="user_name" id="" value="{{user_name}}" />
                    	</div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <label class="input-group-addon">内容</label>
                            <input class="form-control" type="text" name="comment_content" id="" value="{{comment_content}}" />                           
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                        	<label class="input-group-addon" for="">回复时间</label>
                        	<input class="form-control" type="text" id="addtime" name="addtime"  readonly="readonly" value="{{addtime}}" style="width: 400px;" />
                    	</div>
                    </div>
                    <div class="form-group">
                        <button type="submit" class="btn btn-primary"><i class="fa fa-filter"></i> 搜 索</button>
                    </div>
                </form>
            </div>
        </div>

        <table class="table table-hover">
            <thead>
            <tr>
                <th style="width: 60px;">ID</th>
                <th style="width: 80px;">用户名</th>
                <th>内容</th>
                <th style="width: 200px;">回复时间</th>
                <th style="width: 200px;">操作</th>
            </tr>
            </thead>
            {% for d in data %}
                <tr>
                    <td>{{ d.comment_id }}</td>
                    <td>{{ d.user_name|e }}</td>
                    <td>{{ d.comment_content|e }}</td>
                    <td>{{ d.addtime }}</td>
                    <td>
                    	<a href="javascript:void(0)" did="{{ d.comment_id }}" acdid="{{activity_id}}" dstate="0" class="delete" durl="{{ url.get('activity/setCommentState') }}">删除</a>
                    </td>
                   
                </tr>
           {% endfor %} 
        </table>

        {{ this.tagNav.page(
        page,
        total,
        limit,
        url.get('activity/commentList', [
        'id': activity_id,
        'user_name':user_name,
        'comment_content':comment_content,
        'addtime':addtime,
        'page': '__PAGE__'
        ]
        )) }}

    </div>
{% endblock %}